<?php
/**
 * Created by PhpStorm.
 * Author: Shadow
 * Date: 2022/4/20
 * Time: 10:15 上午
 * description: admin.php
 */

use think\facade\Route;

# 访问Login控制器login方法
Route::get('login','login/login');

# 登录验证
Route::post('doLogin','login/doLogin');

# 注册方法
Route::get('register','login/register');


# 密码加密
Route::get('doRegister','login/doRegister');
# 退出登录
Route::get('logout',"login/logout");

# 首页
Route::get('/index','index/index');
# 商品列表
Route::get('/goodsList','goods/list');
# 商品添加页面
Route::get('/goodsAdd','goods/add');
# 实现商品添加功能
Route::post('goodsInsert','goods/insert');

# 实现商品删除功能
Route::post('goodsDel','goods/delete');
// 批量删除
Route::post('goodsBatchDel','goods/batchDelete');

# 商品状态修改、品牌状态修改、文章状态
Route::post('updateStatus','goods/updateStatus');

# 修改商品信息
// 展示模版
Route::get('goodsEditor','goods/goodsEditor');

# 修改数据
Route::post('goodsUpdate','goods/update');

# 公共方法的使用
Route::get('common','goods/common');

Route::get('test',function (){
    \think\facade\View::config(['layout_on' => false]);
    return \think\facade\View::fetch('login/register');
});

# 缩略图
Route::get('thumb',"file/thumb");
# 文字水印
Route::get('fontWater','file/fontWater');
# 图片水印
Route::get('imageWater','file/imageWater');

# 反转
Route::get('imageRotate','file/imageRotate');


/**
 * DB 方式操作数据库
 */
# 查询单个数据
Route::get('getInfo','manager/getOne');

# 列表
Route::get('managerList','manager/list');

# 管理添加和展示视图
Route::any('managerAdd','manager/add');

# 管理员编辑
# 展示视图
Route::get('managerEditor','manager/editor');
# 实现更新
Route::post('managerUpdate','manager/update');

# 删除会员
Route::post('managerDelete','manager/delete');




